def first_non_repeat(xstr):
    assert isinstance(xstr, str)
    xlen = len(xstr)
    if 0 <= xlen <= 1:
        return xstr

    letter2count = {}
    for letter in xstr:
        letter_lower = letter.lower()
        count = letter2count.get(letter_lower, 0)
        count += 1
        letter2count[letter_lower] = count

    for letter in xstr:
        count = letter2count.get(letter.lower(), 0)
        if count == 1:
            return letter


def first_non_repeating_letter(s):
    s_lower = s.lower()
    for char in s:
        if s_lower.count(char.lower()) == 1:
            return char
    return ''


if '__main__' == __name__:

    print(first_non_repeat('sTreSS'))
    print(first_non_repeating_letter('sTreSS'))
